package com.nbjtjc.safe.service.safe;

import com.nbjtjc.safe.bean.Result;
import com.nbjtjc.safe.mapper.safe.SafeInspectTableListPublicMapper;
import com.nbjtjc.safe.model.safe.SafeInspectTableListPublic;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SafeInspectTableListServiceimpl {

    @Autowired
    private SafeInspectTableListPublicMapper tableListPublicMapper;

    public Result getTableListByTablePublicId(int tablePublicId){
        Result result=new Result();
        SafeInspectTableListPublic tableListPublic=new SafeInspectTableListPublic();
        tableListPublic.setPublicTableId(tablePublicId);
        List<SafeInspectTableListPublic> tableListPublicList= tableListPublicMapper.select(tableListPublic);
        tableListPublicList.forEach(listPublic->{
            //todo 检查表中的检查项按分类名字分类
        });
        result.setData(tableListPublicList);
        return result;
    }
}
